package com.xzy.springboot.service;

import org.springframework.stereotype.Component;


//此类用于实现feign调用时服务降级(feign调用出错后会降级为执行此类中方法)
@Component
public class PaymentServiceFallback implements PaymentService {
    @Override
    public String PaymentOk(Integer id) {
        return "线程池:  "+Thread.currentThread().getName()+"id:  "+id+"   消费者侧feign服务降级";
    }

    @Override
    public String PaymentTimeout(Integer id) {
        return "线程池:  "+Thread.currentThread().getName()+"id:  "+id+"   消费者侧feign服务降级";
    }
}
